load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "cloud",
    srcs = [
        "cloud_io.go",
        "external_storage.go",
        "impl_registry.go",
        "kms.go",
        "kms_test_utils.go",
        "metrics.go",
        "options.go",
        "uris.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/cloud",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/base",
        "//pkg/blobs",
        "//pkg/cloud/cloudpb",
        "//pkg/security/username",
        "//pkg/settings",
        "//pkg/settings/cluster",
        "//pkg/sql/isql",
        "//pkg/util/cidr",
        "//pkg/util/ctxgroup",
        "//pkg/util/ioctx",
        "//pkg/util/log",
        "//pkg/util/metric",
        "//pkg/util/quotapool",
        "//pkg/util/retry",
        "//pkg/util/sysutil",
        "//pkg/util/tracing",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_prometheus_client_model//go",
        "@com_github_stretchr_testify//require",
    ],
)

go_test(
    name = "cloud_test",
    srcs = [
        "cloud_io_test.go",
        "uris_test.go",
    ],
    embed = [":cloud"],
    deps = [
        "//pkg/cloud/cloudpb",
        "//pkg/util/ioctx",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_stretchr_testify//require",
    ],
)
